export function getURLParams(search = location.href) {
  const index = search.indexOf('?')
  const raw = search.slice(index + 1)
  return ~index ? Object.fromEntries(new URLSearchParams(raw)) : {}
}
